import pymongo
import json
# 创建客户端连接
client = pymongo.MongoClient('localhost', 27017)

# 基于客户端创建数据库
db = client['spider-db']

# 基于数据库，创建数据表
collection = db['wzj_category']
result = collection.find({})
for item in result:
    print(item)
